//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package study.API.集合;

import java.util.ArrayList;
import java.util.Collection;
import java.util.function.Consumer;

public class Collection_demo {
    public Collection_demo() {
    }

    public static void main(String[] args) {
        Collection<String> coll = new ArrayList();
        coll.add("aaa");
        System.out.println(coll.add("bbb"));
        System.out.println(coll);
        System.out.println(coll.remove("aaa"));
        System.out.println(coll);
        System.out.println(coll.remove("eee"));
        System.out.println(coll.contains("bbb"));
        System.out.println(coll.contains("333"));
        System.out.println(coll.isEmpty());
        System.out.println(coll.size());
        Collection<String> coll2 = new ArrayList();
        coll2.add("aaa");
        coll2.add("bbb");
        coll2.add("ccc");

        for(String str : coll2) {
            System.out.println(str);
        }

        Collection<String> coll3 = new ArrayList();
        coll3.add("11");
        coll3.add("22");
        coll3.add("33");

        for(String str : coll3) {
            System.out.println(str);
        }

        Collection<String> coll4 = new ArrayList();
        coll4.add("uu");
        coll4.add("ii");
        coll4.add("oo");
        coll4.forEach(new Consumer<String>() {
            public void accept(String s) {
                System.out.println(s);
            }
        });
        coll4.forEach((s) -> System.out.println(s));
    }
}
